#include<iostream>
#include <iomanip>
using namespace std;
int main()
{
	double x=1;
	int i=0;
	double ans=0;
	while(1.0/x>=0.00000001)
	{
		if(i==0)
		{ans+=1.0/x;i=1;}
		else
		{ans-=1.0/x;i=0;}
		x+=2;
	}
	cout<<setprecision(8)<<ans*4.0<<endl;
}

